<template>
	<view class="container">
		<Header>我的消息</Header>
		<view class="content article">
			<view v-html="data.message_content"></view>
			<view class="date">
				{{data.createtime}}
			</view>
		</view>
	</view>
</template>

<script>
	import Header from '../../components/header.vue'
	import request from '../../common/request.js'
	export default {
		components: {
			Header
		},
		data() {
			return {
				id: '',
				data:{}
			}
		},
		onLoad(option) {
			this.id  = option.id
		},
		mounted(){
			this.getDetailData()
		},
		methods: {
			getDetailData(){
				request({
					url:'/message/detail',
					data:{
						message_id: this.id
					},
					method: 'POST'
				}).then(res => {
					if(res.code == 1){
						this.data = res.data
					}else{
						uni.showToast({
							title: res.msg,
							icon: 'none',
							duration: 2000
						});
					}
				})
			}
		}
	}
</script>

<style scoped>
	.container{
		/* background-color: #f9f9f9;
		min-height: calc(100vh - 45px); */
	}
	.content{
		padding: 20px;
		line-height: 30px;
	}
	.title{
		font-size: 16px;
		font-weight: bold;
		text-align: center;
		line-height: 26px;
	}
	.date{
		font-size: 14px;
		margin: 10px 0px;
	}
</style>